﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AcademicPlanner.Framework.Libraries.Auth
{
	public class DBorOpenIdBAuthenticator : IAuthenticator
	{
		private DBBAuthenticator dbAuthN;

		private OpenIdBAuthenticator opdAuthN;


		public DBorOpenIdBAuthenticator(string pConnection)
		{
			dbAuthN = new DBBAuthenticator(pConnection);
			opdAuthN = new OpenIdBAuthenticator();
		}


		public AuthenticationResult Authenticate(string pUser, string pPassword)
		{
			return dbAuthN.Authenticate(pUser, pPassword);
		}

		public AuthenticationResult Authenticate(string pUser)
		{
			return opdAuthN.Authenticate(pUser);
		}
	}
}
